﻿@using WarSpot.WebFace.Security
<!DOCTYPE html>
<html>
<!--
<html manifest="/cashe.manifest">
-->
<head>
  <meta charset="utf-8" />
  <title>@ViewBag.Title</title>
  <link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />
  <script src="@Url.Content("~/Scripts/jquery-1.5.1.min.js")" type="text/javascript"></script>
  <script src="@Url.Content("~/Scripts/modernizr-1.7.min.js")" type="text/javascript"></script>
  <script type="text/javascript">

    var _gaq = _gaq || [];
    _gaq.push(['_setAccount', 'UA-38262437-2']);
    _gaq.push(['_trackPageview']);

    (function () {
      var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
      ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
      var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
    })();

  </script>
  <script type="text/javascript">
      function onSpoiler(n, showmsg, hidemsg) {
          $('.spoiler#' + n + ' a').siblings('.scontent').toggle(100);
          if ($('.spoiler#' + n + ' a').text() == showmsg) {
              $('.spoiler#' + n + ' a').text(hidemsg);
          } else {
              $('.spoiler#' + n + ' a').text(showmsg);
          }
      }
  </script>
</head>
<body>
  <div class="page">
    <header>
      <div id="logindisplay">
        @Html.Partial("_LogOnPartial")
      </div>
      <a href="/" style="float:left;"><img src="/Content/images/LogoMed.png" width="200" height="68"></a>
      <nav class="mynav">
        <ul id="menu">
          <li>@Html.ActionLink("О проекте", "Details", "Home")</li>
          <li>@Html.ActionLink("Файлы", "Index", "File")</li>
          <li>@Html.ActionLink("Документы", "Index", "Document")</li>
          @{ var identity = (User.Identity as CustomIdentity);
             if (identity != null && identity.IsInRole("User"))
						 {
						 	<li>@Html.ActionLink("Быстрый старт", "FastStart", "Home")</li>
						 	<li>@Html.ActionLink("AI", "Index", "AI")</li>
						 	<li>@Html.ActionLink("Игры", "Index", "Games")</li>
						 }
            if (identity != null && (identity.IsInRole("Admin") || identity.IsInRole("User")))
            {
						<li>@Html.ActionLink("Турниры", "Index", "Tournament")</li>
             }
             if (identity != null && identity.IsInRole("MetaAdmin"))
             {
            <li>@Html.ActionLink("Пользователи", "Index", "Users")</li>
             }
          }
        </ul>
      </nav>
      <div style="clear: both; height:0px;"></div>
    </header>
    <section id="main">
      @RenderBody()
    </section>
    <footer>
			@Html.Partial("_FooterPartial")<br/>
      @Html.ActionLink("О команде", "About", "Home")&nbsp;
      @Html.ActionLink("Контакты", "Contacts", "Home")
    </footer>
  </div>
</body>
</html>
